package com.mars.module.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import cn.afterturn.easypoi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 中奖记录对象 record
 *
 * @author mars
 * @date 2024-04-23
 */

@Data
@ApiModel(value = "中奖记录对象")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("record")
public class Record{

    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id")
    private Integer id;
    /**
     * 中奖人员id
     */
    @ApiModelProperty(value = "中奖人员id")
    private Long userId;
    /**
     * 活动id
     */
    @ApiModelProperty(value = "活动id")
    private Integer activityId;
    /**
     * 中奖奖项id
     */
    @ApiModelProperty(value = "中奖奖项id")
    private Integer awardId;
    /**
     * 0: 未中奖  1：中奖
     */
    @Excel(name = "0: 未中奖  1：中奖")
    @ApiModelProperty(value = "0: 未中奖  1：中奖")
    private Integer isAward;

    @Excel(name = "创建时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Excel(name = "中奖人员")
    @ApiModelProperty(value = "中奖人员")
    private String userName;

    @Excel(name = "活动名称")
    @ApiModelProperty(value = "活动名称")
    private String activityName;

    @Excel(name = "奖品名称")
    @ApiModelProperty(value = "奖品名称")
    private String awardName;
}
